Azimuth measuring devices which detect earth magnetism to obtain azimuths are used for navigation in cellular phones, or the like. When using an azimuth measuring device of this kind, it is usually known that it would indicate an erroneous azimuth unless an azimuth is obtained by subtracting the offsets which are an output signal caused by a surrounding magnetic field other than earth magnetism detected by a magnetic field sensor and an offset for an output of a signal processing circuit at the time when no signal is inputted.
As methods for obtaining an offset, there are known methods, as one disclosed in Patent Document 1, in which an azimuth measuring device is kept horizontally and turned around once, and the maximum and minimum of output signal are searched in the meantime and the offsets is set to a midpoint thereof, and another one in which, as disclosed in Patent Document 2, an equation for the trajectory of output signal while an azimuth measuring device is turned around once is solved based on geomagnetic data which is obtained by directing an azimuth measuring device at arbitrary three points being perpendicular to each other, and then an offset is calculated. In addition, there is a method in which offset information is calculated based on geomagnetic data obtained while the direction of an azimuth measuring device is arbitrarily changed in a three dimensional space (the above method can be found in Patent Document 3, and is incorporated into the present application with reference thereto).
FIG. 3 is a view explaining the concept of a method for obtaining offset information in an azimuth measuring device. This method is disclosed in Patent Document 3.
In FIG. 3, the direction of an azimuth measuring device 1 is arbitrarily changed in a three dimensional space, and, in the meantime, x-axis geomagnetic measured data, y-axis geomagnetic measured data, and z-axis geomagnetic measured data are repeatedly obtained until the number of obtained data reaches a predetermined number N. Hereinafter, Sx, Sy, and Sz denote geomagnetic measured data on which sensitivity correction has been performed with a sensitivity correction calculation section provided to an azimuth measuring device 1, unless otherwise noted.
Individual data of Sx, Sy, and Sz having been repeatedly obtained are respectively set as P1(S1x, S1y, S1z), P2(S2x, S2y, S2z), P3(S3x, S3y, S3z), . . . , and as shown in FIG. 3. They are placed in a three dimensional space by relating the values of Sx, Sy, and Sz to the direction components of the respective axes.
Here, Sx, Sy, and Sz are expressed by the following equations.Sx=a·Mx+Cx  (1)Sy=a·My+Cy  (2)Sz=a·Mz+Cz  (3)where a is a sensitivity after performing a sensitivity correction for an x-axis hall element HEx, a y-axis hall element HEy, and a z-axis hall element HEz; Mx, My, and Mz are x, y, and z-axis direction components of earth magnetism; and Cx, Cy, and Cz are the offsets of Sx, Sy, and Sz, respectively.
On the other hand, the relationship between Mx, My, Mz and M is given as follows.
[Equation 1]M=√{square root over (Mx2+My2+Mz2)}  (4)Now, setting as,
[Equation 2]r=a√{square root over (My2+My2+Mz2)}  (5)then, the following equation is derived.(Sx−Cx)2+(Sx−Cx)2+(Sx−Cx)2=r2  (6)That is, (Sx, Sy, Sz) is certainly placed away from a reference point OP(Cx, Cy, Cz) with the same distance r.
Accordingly, the reference point OP can be estimated by calculating a point which has equal distances from all the points of P1(S1x, S1y, S1z), P2(S2x, S2y, S2z), P3(S3x, S3y, S3z), . . . , and the offsets Cx, Cy, and Cz can be obtained on the basis of the coordinate values thereof.
Although there are various kinds of methods for estimating the reference point OP, Sx, Sy, and Sz to be actually obtained are measured data of extremely weak earth magnetism which is of the order of 0.01 mT, and overlap with a significant amount of noise, and it is hence preferred that a statistical method be used after increasing the number of obtained data N as many as possible. Now, for example, according to a method described in Patent Document 3, as in the following equation, a system of linear equations with respect to Cx, Cy, and Cz can be solved, and thereby the reference point OP can be estimated in a good accuracy while suppressing the increase of the calculation time.
                    [                  Equation          ⁢                                          ⁢          3                ]                                                                                  [                                                                                ∑                                                                                            Si                          x                                                ⁡                                                  (                                                                                    Si                              x                                                        -                                                                                          S                                x                                                            _                                                                                )                                                                    ⁢                                              ∑                                                                                                            Si                              y                                                        ⁡                                                          (                                                                                                Si                                  x                                                                -                                                                                                      S                                    x                                                                    _                                                                                            )                                                                                ⁢                                                      ∑                                                                                          Si                                z                                                            ⁡                                                              (                                                                                                      Si                                    x                                                                    -                                                                                                            S                                      x                                                                        _                                                                                                  )                                                                                                                                                                                                                                                                          ∑                                                                                            Si                          x                                                ⁡                                                  (                                                                                    Si                              y                                                        -                                                                                          S                                y                                                            _                                                                                )                                                                    ⁢                                              ∑                                                                                                            Si                              y                                                        ⁡                                                          (                                                                                                Si                                  y                                                                -                                                                                                      S                                    y                                                                    _                                                                                            )                                                                                ⁢                                                      ∑                                                                                          Si                                z                                                            ⁡                                                              (                                                                                                      Si                                    y                                                                    -                                                                                                            S                                      y                                                                        _                                                                                                  )                                                                                                                                                                                                                                                                          ∑                                                                                            Si                          x                                                ⁡                                                  (                                                                                    Si                              z                                                        -                                                                                          S                                z                                                            _                                                                                )                                                                    ⁢                                              ∑                                                                                                            Si                              y                                                        ⁡                                                          (                                                                                                Si                                  z                                                                -                                                                                                      S                                    z                                                                    _                                                                                            )                                                                                ⁢                                                      ∑                                                                                          Si                                z                                                            ⁡                                                              (                                                                                                      Si                                    z                                                                    -                                                                                                            S                                      z                                                                        _                                                                                                  )                                                                                                                                                                                                                              ]                    ⁡                      [                                                                                C                    x                                                                                                                    C                    y                                                                                                                    C                    z                                                                        ]                          =                            (        7        )                                                          ⁢                              1            2                    ⁡                      [                                                                                ∑                                                                  (                                                                              Si                            x                            2                                                    +                                                      Si                            y                            2                                                    +                                                      Si                            z                            2                                                                          )                                            ⁢                                              (                                                                              Si                            x                                                    -                                                                                    S                              x                                                        _                                                                          )                                                                                                                                                              ∑                                                                  (                                                                              Si                            x                            2                                                    +                                                      Si                            y                            2                                                    +                                                      Si                            z                            2                                                                          )                                            ⁢                                              (                                                                              Si                            y                                                    -                                                                                    S                              y                                                        _                                                                          )                                                                                                                                                              ∑                                                                  (                                                                              Si                            x                            2                                                    +                                                      Si                            y                            2                                                    +                                                      Si                            z                            2                                                                          )                                            ⁢                                              (                                                                              Si                            z                                                    -                                                                                    S                              z                                                        _                                                                          )                                                                                                                  ]                                                          where
                    [                  Equation          ⁢                                          ⁢          4                ]                                                                                  S            x                    _                =                              1            N                    ⁢                      ∑                          Si              x                                                          (        8        )            
                    [                  Equation          ⁢                                          ⁢          5                ]                                                                                  S            y                    _                =                              1            N                    ⁢                      ∑                          Si              y                                                          (        9        )            
                    [                  Equation          ⁢                                          ⁢          6                ]                                                                                  S            z                    _                =                              1            N                    ⁢                      ∑                          Si              z                                                          (        10        )            Moreover, r is expressed by following equation by using Cx, Cy and Cz.
                    [                  Equation          ⁢                                          ⁢          7                ]                                                                      r          2                =                              1            N                    ⁢                      ∑                          {                                                                    (                                                                  Si                        x                                            -                                              C                        x                                                              )                                    2                                +                                                      (                                                                  Si                        y                                            -                                              C                        y                                                              )                                    2                                +                                                      (                                                                  Si                        z                                            -                                              C                        z                                                              )                                    2                                            }                                                          (        11        )            
FIG. 4 is a flowchart showing a method of obtaining offset information in an azimuth measuring device. This method is disclosed in Patent Document 3.
In FIG. 4, a data buffer section provided to an azimuth measuring device obtains geomagnetic measured data Sx, Sy, and Sz, and puts them into a buffer. (Step S1)
Next, it is determined whether the number of geomagnetic measured data Sx, Sy, and Sz retained in the data buffer section has reached the predetermined number N of data to be obtained. (Step S2)
When the number of geomagnetic measured data Sx, Sy, and Sz retained in the data buffer section has not reached the predetermined number N of data to be obtained, the process returns to Step S1.
On the other hand, when the number of geomagnetic measured data Sx, Sy, and Sz retained in the data buffer section has reached the predetermined number N of data to be obtained, a data processing section provided to an azimuth measuring device 1 reads geomagnetic measured data Sx, Sy, and Sz from the data buffer section to the number of which data correspond to the predetermined number N of data to be obtained; and the coordinates Cx, Cy, and Cz of the reference point OP are estimated such that the variation of the distances from individual data P1(S1x, S1y, S1z), P2(S2x, S2y, S2z), P3(S3x, S3y, S3z), . . . is minimized. (Step S3)
As the offsets of geomagnetic measured data Sx, Sy, and Sz, the coordinates Cx, Cy, and Cz of the reference point OP are stored in an offset information storing section provided to an azimuth measuring device. (Step S4)    Patent Document 1: U.S. Pat. No. 1,422,942 Specification    Patent Document 2: Japanese Patent Application Laid-open No. 2000-131068    Patent Document 3: International Application No. JP03/08293 Specification